Improved Average Complexity for Comparison-Based Sorting

نویسندگان

  • Kazuo Iwama
  • Junichi Teruyama
چکیده

This paper studies the average complexity on the number of comparisons for sorting algorithms. Its information-theoretic lower bound is n lg n− 1.4427n+O(log n). For many efficient algorithms, the first n lg n term is easy to achieve and our focus is on the (negative) constant factor of the linear term. The current best value is −1.3999 for the MergeInsertion sort. Our new value is −1.4106, narrowing the gap by some 25%. An important building block of our algorithm is “two-element insertion,” which inserts two numbers A and B, A < B, into a sorted sequence T . This insertion algorithm is still sufficiently simple for rigorous mathematical analysis and works well for a certain range of the length of T for which the simple binary insertion does not, thus allowing us to take a complementary approach with the binary insertion.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parallel Bucket Sorting Algorithm

Bucket sorting algorithm achieves O(n) running time complexity in average. It is very fast compared to any comparison-based sorting algorithms that usually have a lower bound of Ω(n log n). Given an unsorted array of n positive integers, bucket sorting algorithm works by distributing the elements into m ordered buckets each contains zero or more elements. Each bucket is then sorted using either...

متن کامل

Comparative Performance Study of Improved Heap Sort Algorithm on Different Hardware

Problem statement: Several efficient algorithms were developed to cope with the popular task of sorting. Improved heap sort is a new variant of heap sort. Basic idea of new algorithm is similar to classical Heap sort algorithm but it builds heap in another way. The improved heap sort algorithm requires nlogn-0.788928n comparisons for worst case and nlogn-n comparisons in average case. This algo...

متن کامل

Sorting and Order Statistics

We will analyze the number of comparisons needed to solve the problem of sorting n distinct items into ascending order, and the related problem of selecting the kth smallest item from an unsorted list of n items. Section 1 examines mergesort, an algorithm with excellent worst case performance, and Section 2 examines quicksort, an algorithm with excellent average case performance. Section 3 cont...

متن کامل

A Simplified Derivation of Timing Complexity Lower Bounds for Sorting by Comparisons

We present a simplified derivation of the fact that the complexity-theoretic lower bound of comparison-based sorting algorithms, both for the worst-case and for the average-case time measure, is Ω(nlogn). The standard proofs typically are directly presented over decision trees. The proof for the average-case however relies on differential calculus, which presents a main hurdle in undergraduate ...

متن کامل

A New Data Structure for Heapsort with Improved Number of Comparisons

In this paper we present a new data structure for implementing heapsort algorithm for pairs of which can be simultaneously stored and processed in a single register. Since time complexity of Carlsson type variants of heapsort has already achieved a leading coefficient of 1, concretely n lgn + n lg lg n, and lower bound theory asserts that no comparison based in-place sorting algorithm can sort ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017